package Test;

import java.util.Scanner;

public class 十进制转换字符串二进制 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个整数:");
        String s = sc.nextLine();
        StringBuilder result=new StringBuilder();
        int input = Integer.parseInt(s);
        while (input!=0){
           int yu=input%2;
            input=input/2;
            result.insert(0,yu);
        }
        System.out.println(result.toString());
    }
}
